<html lang="en">
<head>
    @include('Admin.header')
    <link rel="stylesheet" href="{{ URL::asset('css/page.css') }}?v={{$version}}">
</head>
<body>
<!-- 顶部开始 -->
@component('Admin.section.title')
@endcomponent
<div class="wrapper">
    @include('Admin.menu')
    <div class="page-content">
        <div class="content">
            <xblock>
                <button class="layui-btn" onclick="_add('添加权限','{{url('Admin/System/authority/add')}}','600','400')"><i class="layui-icon">&#xe608;</i>添加</button><span class="x-right" style="line-height:40px">共有数据：{{count($list)}} 条</span>
            </xblock>
            <table class="layui-table">
                <thead>
                <tr>
                    <th>
                        ID
                    </th>
                    <th>
                        权限名称
                    </th>
                    <th>
                        所属模块
                    </th>
                    <th>
                        所属分类
                    </th>
                    <th>
                        权限代码
                    </th>
                    <th>
                        是否有角色使用
                    </th>
                    <th>
                        操作
                    </th>
                </tr>
                </thead>
                <tbody>
                @foreach ($list as $vo)
                    <tr>
                        <td>
                            {{ $vo->id }}
                        </td>
                        <td>
                            {{ $vo->name }}
                        </td>
                        <td>
                            {{ $vo->m_name }}
                        </td>
                        <td>
                            {{ $vo->c_name }}
                        </td>
                        <td>
                            {{ $vo->code }}
                        </td>
                        <td >
                            {{$vo->use}}
                        </td>
                        <td class="td-manage">
                            <a title="编辑" href="javascript:;" onclick="_edit('编辑','{{url('Admin/System/authority/edit')}}/{{$vo->id}}','600','280')"
                               class="ml-5" style="text-decoration:none">
                                <i class="layui-icon">&#xe642;</i>
                            </a>&nbsp;
                            @if($vo->use == 0)
                            <a title="删除" href="javascript:;" onclick="_del(this,'{{url('Admin/System/authority/del')}}','{{$vo->id}}','{{csrf_token()}}')" style="text-decoration:none">
                                <i class="layui-icon">&#xe640;</i>
                            </a>
                            @endif
                        </td>
                    </tr>
                @endforeach
                </tbody>
            </table>
            {{ $list->links() }}
        </div>
    </div>
</div>
@component('Admin.section.bg')
@endcomponent
</body>
</html>